feat: set NO_COLOR=1 in agent container environment#971
Conversation
Disables ANSI color escape codes from CLI tools (Rich, Chalk, etc.) inside the container. Tools like Rich inject escape codes that break test assertions expecting plain text output (e.g. typer CLI tests). NO_COLOR is a standard convention (https://no-color.org/) supported by many libraries. Adding it to the base environment ensures it is always set before --env-all expansion. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded. |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
There was a problem hiding this comment.
Pull request overview
This PR standardizes non-colored CLI output inside the agent container by forcing NO_COLOR=1 in the generated Docker Compose environment, preventing ANSI escape codes from breaking CLI-output-based assertions (notably in Typer/Rich help text comparisons).
Changes:
- Set
NO_COLOR=1in the base agent container environment withingenerateDockerCompose. - Add a unit test asserting the agent service environment includes
NO_COLOR=1.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/docker-manager.ts | Adds NO_COLOR=1 to the agent container’s base environment to disable ANSI color output consistently. |
| src/docker-manager.test.ts | Adds a unit test verifying NO_COLOR is set on the agent service environment. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
C++ Build Test Results
Overall: PASS ✅ All C++ projects built successfully.
|
Deno Build Test Results
Overall: ✅ PASS All Deno tests completed successfully.
|
Smoke Test ResultsLast 2 merged PRs:
Test Results:
Status: PASS cc @Mossaka
|
Go Build Test Results
Overall: PASS ✅ All Go projects successfully downloaded dependencies and passed tests.
|
.NET Build Test Results
Overall: PASS ✅ All .NET projects restored, built, and ran successfully.
|
Node.js Build Test Results
Overall: ✅ PASS All Node.js projects installed successfully and passed their tests.
|
Java Build Test Results ✅All Java projects compiled and tested successfully through the firewall.
Overall: PASS All dependencies were successfully downloaded through the Squid proxy (
|
Smoke Test Results✅ GitHub MCP: Listed recent PRs
✅ Playwright: Navigated to github.com (title: "GitHub · Change is constant. GitHub keeps you ahead. · GitHub") ✅ File Writing: Created /tmp/gh-aw/agent/smoke-test-claude-22200394483.txt ✅ Bash: Verified file content Status: PASS
|
Chroot Test ResultsThe chroot mode test compared runtime versions between the host and chroot environment:
Overall Result: ❌ Some tests failed The chroot environment should transparently use host binaries, but Python and Node.js versions don't match. This indicates the chroot mode may not be working correctly for these runtimes.
|
|
PR Titles: feat: set NO_COLOR=1 in agent container environment; chore(deps): bump the all-npm-dependencies group across 1 directory with 8 updates
|
Summary
NO_COLOR=1to the base agent container environment indocker-manager.tsdocker-manager.test.tsverifying the env var is setProblem
The python/typer test suite has 150 failures because the Rich library injects ANSI escape codes into CLI help output. Tests expect plain text like
"Usage: custom-name [OPTIONS]"but get"Usage: \x1b[0m\x1b[1mcustom-name [OPTIONS]\x1b[0m".Solution
NO_COLORis a standard convention (no-color.org) supported by many libraries including Rich (Python), Chalk (Node.js), and others. SettingNO_COLOR=1in the container environment tells all compliant tools to disable color output.The env var is added to the base
environmentobject (alongsideHTTP_PROXY,HOME, etc.) so it is always set before--env-allexpansion. Since--env-allskips keys already inenvironment, users cannot accidentally override it with a hostNO_COLOR=0.Test plan
npm test)should set NO_COLOR=1 to disable ANSI color output from CLI tools🤖 Generated with Claude Code